Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

83
Visualizações
A CGI program replaced a variable ^. This "OldSearchWord" should be replaced via js with a modified OldSearchWord, the NewSearchWord

A Query with an OldSearchWord UNITY SOFTWARE leads to a new page where a variable ^ is replaced with the OldSearchWord UNITY SOFTWARE. This works fine.

After the result page is loaded, the OldSearchWord UNITY SOFTWARE should be modified in this way: The white space character should be replaced with a _. The result, the NewSearchWord, should look like UNITY_SOFTWARE.

The Problem: No NewSearchWord is created and looks like the OldSearchWord.

How can the OldSearchWord UNITY SOFTWARE changed after the page has loaded into the NewSearchWord UNITY_SOFTWARE?

My code:

<body  onload="myFunction()">
New search word:  <span id="NewSearchWord"></span>
<script>
let OldSearchWord;
let NewSearchWord;
OldSearchWord = "^";
</script>
<script>
function myFunction() 
{   
NewSearchWord = ( OldSearchWord.replace(/\s+/, '_') );
document.getElementById("NewSearchWord").innerHTML = NewSearchWord;
window.alert(NewSearchWord);
}
</script>
</body>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda